select count(*), DATE_FORMAT(timestamp, "%Y-%m-01") from title group by DATE_FORMAT(timestamp, "%Y-%m-01")
GROUP BY DATE_FORMAT(record_date, '%Y%m')
SELECT SUM(foo), DATE(mydate) FROM a_table GROUP BY DATE(a_table.mydate);